package com.niit.controller;

import com.niit.entity.Menu;
import com.niit.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/menu")
public class MenuController {
	@Autowired
	private MenuService menuService;

	@GetMapping("/getAll")
	public List<Menu> getAllMenus() {
		return menuService.getAllMenu();
	}
}
